#pragma once
#include "mkvparserstream.hpp"

namespace MkvParser
{

class AudioTrack;
class AudioStream : public Stream
{
    explicit AudioStream(AudioTrack*);
    AudioStream(const AudioStream&);
    AudioStream& operator=(const AudioStream&);
    
public:
    static AudioStream* CreateInstance(AudioTrack*);
    
    void GetMediaTypes(CMediaTypes&) const;
    HRESULT QueryAccept(const AM_MEDIA_TYPE*) const;
    HRESULT UpdateAllocatorProperties(ALLOCATOR_PROPERTIES&) const;
    
#if 0  //TODO: use this for incremental loading    
    HRESULT PopulateSample(IMediaSample*, __int64&);
#endif

    HRESULT PopulateSample(IMediaSample*);

protected:
    std::wostream& GetKind(std::wostream&) const;
    //bool IsKey(const Block*) const;

    void GetAc3MediaTypes(CMediaTypes&) const;
};


}  //end namespace MkvParser
